﻿using System;
using Tango.Infrastructure;

namespace Tango
{
    public static class Bootstrapper
    {
        static Bootstrapper()
        {
            try
            {
                IoC.Initialize(new DependencyResolverFactory());
            }
            catch (Exception ex)
            {
                Log.Exception(ex);
            }
        }

        public static void Run()
        {
            IoC.ResolveAll<IBootstrapperTask>().ForEach(r => r.Execute());
        }
    }
}
